import Vue from 'vue'
import App from './App.vue'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import router from "@/router";
// import 'normalize.css/normalize.css';
import Backline from '@/components/Backline.vue';
import PgElTable from '@/components/PgElTable.vue';
import PgElTableUrl from '@/components/PgElTableUrl.vue';
import store from '@/store';

Vue.config.productionTip = false

// Vue.use(ElementUI);
Vue.use(ElementUI, { size: 'medium', zIndex: 3000 })
Vue.component(Backline.name, Backline);
Vue.component(PgElTable.name, PgElTable);
Vue.component(PgElTableUrl.name, PgElTableUrl);
new Vue({
  render: h => h(App),
  router,
  store
}).$mount('#app')


// router.beforeEach((to, from, next) => {
//   var islogin = store.state.user.token;
//   if (to.name !== 'login' && !islogin) next({ name: 'login' })
//   else next()
// })